<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>出入库明细修改</title>
</head>
<body>
    <div class="pd-20">
        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="fgid" name="fgid" value="" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />
            <input type="hidden" id="dataneedtouser" name="dataneedtouser" value="1" /><!--是否要包含通用数据必归属处理-->
            <!--     <input type="hidden" id="ywcheckonly" name="ywcheckonly" value="ftype,fname#当前客户已存在!" /><!--唯一性检查-->
            <input type="hidden" id="ffromid" name="ffromid" value="" />
            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fspname" id="fspname" readonly="true" style="background-color: #cccccc;" nullmsg="名称不能为空" datatype="*2-10" placeholder="2~10个字符" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>数量：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fcount" id="fcount" nullmsg="数量不能为空" datatype="*1-10" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>单价：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fprice" id="fprice" nullmsg="不能为空" datatype="*1-50" placeholder="1~50个字符" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>厂家：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fspbasecj" id="fspbasecj" nullmsg="不能为空" datatype="*1-10" placeholder="1~10个字符" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>资质：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fspbasezj" id="fspbasezj" nullmsg="不能为空" datatype="*1-10" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>生产批号：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fspbasepc" id="fspbasepc" nullmsg="不能为空" datatype="*1-50" placeholder="1~50个字符" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1"><span class="c-red">*</span>生产日期：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="fspbasecdate" id="fspbasecdate" class="input-text Wdate" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>说明：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fspbasedesc" id="fspbasedesc" />
                </div>
                  <div class="col-1"></div>
                <label class="form-label col-1"><span class="c-red">*</span>类型：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fdatastate" id="fdatastate" readonly="true" style="background-color: #cccccc;" />

                </div>
            </div>
            <div class="row cl">
                <div class="col-6 col-offset-4">
                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交</button>&nbsp;&nbsp;
				<button class="btn btn-secondary radius" type="button" id="btn_reset">重置</button>&nbsp;&nbsp;
				<button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>
                </div>
            </div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <!--以下为多选择下拉ggggggggggggg-->
    <link rel="stylesheet" href="../homepage/css/bootstrap.min.css" type="text/css" />
    <script type="text/javascript" src="../homepage/js/bootstrap.min.js"></script>

    <script type="text/javascript" src="../homepage/js/bootstrap-multiselect.js"></script>
    <link rel="stylesheet" href="../homepage/css/bootstrap-multiselect.css" type="text/css" />
    <script type="text/javascript">
        Mhcloadback[0] = "count";
        var old_count = 0;
        hcui_ajaxasync = false;
        //加载处理
        function loadin() {
            //本页面 
            spsetBase("herp_inoutorderlist", "id", "herp_inoutorderlist as T", "*", "#tablelist", "herp_inoutorderlist", "出入库明细", "herp_inoutorderlist");
        }
        //提交数据后,回调
        function subback(data) {
            if (data.status == "y") {
                var showmessage = "处理成功";
        
                if ($("#fdatastate").val() == "出库") {               //同步原库存信息
                    hcapipost("../api/Hcrain/OutStoreUpdate", { "listoutid": $("#id").val(), "oldcount": old_count, "newcount": $("#fcount").val() }, function (data) { });
                }
                layer.confirm(showmessage, {
                    btn: ['确认'] //按钮
                }, function (index) {
                    layer_close();

                }, function (index) {
                    layer_close();
                });

            }
            else {
                layer.alert(data.info, { icon: 2 });
            }
        }
        function loadback(data) {
            old_count = data.count;
        }
    </script>
</body>
</html>
